﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class AddCategory : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadData();
        }
    }

    private void LoadData()
    {
        ManagementContract processCon = new ManagementContract();
        
            int contractID = Int32.Parse(Request.QueryString["ContractID"]);
            DataSet ds = processCon.LoadContract(contractID);
            DataList1.DataSource = ds;
            DataBind();

       
    }

    protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
    {
        if (e.CommandName.Equals("select"))
        {
            Response.Redirect("ManagementContract.aspx");
        }
    }
}